<?php

/*
  | --------------------------------------------------------------------------------------------------
  | <agenda_diaria_view>
  |
  | Desenvolvedor:	Eduardo Sirangelo
  | E-mail:		sirangelos@ibest.com.br
  | Descrição:
  |	-
  | Quality is Everyting
  | --------------------------------------------------------------------------------------------------
 */
?>
<section class="grid_12">
    
    <div class="block-border"><div class="block-content">
            <div class="h1">
                    <h1><?=$this->functions->formataDataStampBr($data,"br")?></h1>
                    <a href="#addAgendamento()" class="with-tip add-event agendar_por_mes" title="Agendar atendimento"><img src="<?=base_url()?>public/images/icons/fugue/plus-circle-blue.png" width="16" height="16" alt=""/> Novo Agendamento</a>                    
            </div>

            <div class="block-controls">
                <ul class="controls-buttons">
                        <li>
                                <label for="show-empty">Mostrar horários preenchidos</label>
                                <input type="checkbox" name="show-empty" id="show-empty" value="1" class="mini-switch" checked="checked">
                        </li>
                </ul>
            </div>
            
            <ul class="message no-margin">
                    <li><?=$total_eventos?> agendameto(s) para esta data</li>
            </ul>

            <div class="no-margin">
                
                <table cellspacing="0" class="list-calendar">

                        <tbody>
                                
                            <?
                            foreach($array_agendamento as $row) {
                                
                                ?>
                                <tr class="<?=$row['classe01']?>">
                                    <th scope="row"><?=$this->functions->returnHoraMinuto($row['data_hora'])?></th>
                                    <td>
                                        
                                        <ul class="events">
                                            <?
                                            
                                            foreach($row['lista_eventos'] as $row0) {
                                                ?>
                                                <li><?=$row0?></li>
                                                <?
                                            }        
                                            ?>
                                        </ul>
                                        <?
                                        if($row['num_eventos'] > 0) {   
                                        ?>
                                        <div class="more-events">
                                            <?="Mais " . $row['num_eventos'] . " agendamento(s)"?>
                                            <ul>
                                                <?
                                                foreach($row['lista_eventos_full'] as $row1) {
                                                    ?>
                                                    <li><?=$row1?></li>
                                                    <?
                                                }        
                                                ?>
                                            </ul>
                                        </div>
                                        <?
                                        }
                                        ?>
                                    </td>
                                </tr>
                                
                                <?
                            }
                            ?>
                                
                            </tbody>
                    </table>
            </div>

    </div></div>
</section>